﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HR60_PanelSoft.Model;

namespace HR60_PanelSoft.Service
{
	public class SceneService : CommonService
	{
		public static Scene findByUuid(string uuid)
		{
			foreach (Scene scene in proj.scenes)
			{
				if (scene.uuid == uuid)
					return scene;
			}
			return null;
		}

		public static List<Scene> findListByUuid(List<string> uuids)
		{
			List<Scene> list = new List<Scene>();
			foreach (string uuid in uuids)
			{
				list.Add(findByUuid(uuid));
			}
			return list;
		}
		
		// 添加
		public static void append(Scene scene)
		{
			proj.scenes.Add (scene);
		}

		// 删除
		public static void remove(Scene scene)
		{
			// TODO: 卸载按键映射

			// TODO: 卸载外部信号映射

			proj.scenes.Remove (scene);
		}
	}
}
